public class Student {
    private final String name;
    private final String banji;
    private final String studentid;
    private final String gender;
    private final int age;
    private final String personality;
    // 构造函数，初始化学生的各项信息
    public Student(String a,String b,String c,String d,int e,String f){
        name=a;
        banji=b;
        studentid=c;
        gender=d;
        age=e;
        personality=f;
    }
    // 获取学生信息的 getter 方法
    public String getName() {
        return name;
    }
    public String getBanji() {
        return banji;
    }
    public String getStudentid() {
        return studentid;
    }
    public String getGender() {
        return gender;
    }
    public int getAge() {
        return age;
    }
    public String getPersonality() {
        return personality;
    }
    // 输出学生信息的 method
    public void information() {
        System.out.println("姓名: "+name);
        System.out.println("班级: "+banji);
        System.out.println("学号: "+studentid);
        System.out.println("性别: "+gender);
        System.out.println("年龄: "+age);
        System.out.println("性格: "+personality);
    }
    public static void main(String[] args) {
        // 创建学生对象
        Student student1=new Student("张三","地信","202301","男",19,"好");
        Student student2=new Student("李四","地信","202302","男",19,"好");
        Student student3=new Student("王麻子","地信","202303","男",19,"好");
        // 输出学生信息
        System.out.println("\n学生1信息:");
        student1.information();
        System.out.println("\n学生2信息:");
        student2.information();
        System.out.println("\n学生3信息:");
        student3.information();
    }
}
